<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>checkbox</title>
<link rel="stylesheet" type="text/css" href="../../ext3/css/ext-all.css" />
<script type="text/javascript" src="../../ext3/ext-base-debug.js"></script>
<script type="text/javascript" src="../../ext3/ext-all-debug.js"></script>
<script type="text/javascript" src="../../ext3/ext-basex.js"></script>
<script type="text/javascript" src="../../ext3/ext-lang-zh_CN.js"></script>
<script src="../../js/commons/form/formExt.js"></script>
</head>
<body>
<script>

var formpanel = new Ext.form.FormPanel({
	url:'doProcess.do',
	title:"checkBox",
	frame:true,
	items:[{
		xtype:'textfield',
		fieldLabel:'姓名',
		name:'name'
	},{
		xtype:'textfield',
		fieldLabel:'性别'
	}],
	buttons:[{
		text:'保存',
		handler:function(){
		if(formpanel.getForm().isValid()){
			formpanel.getForm().doAction("submit",{
   				 waitTitle : '请等待',
   				 waitMsg: '正在加载中',
   				 success:function(form,action){
   				 		alert('ok');
    			 },
   				 failure:function(form,action){
   				 		alert('error');
    			 }
			});  
		}
		}
	}]
});
		Ext.onReady(function(){
			Ext.QuickTips.init();
			Ext.form.Field.prototype.msgTarget='side';
			var viewport = new Ext.Viewport({
				items:[formpanel]
			});
		});
	</script>
</body>
</html>